package cn.tedu.springboot;

import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController//接受浏览器的请求 并返回json数据
public class HelloController {
    //  @RequestMapping("hi")//只匹配一个路径
    //打开浏览器访问 ：http://localhost:8080/hi
    @RequestMapping({"hi","hello/hi"})//匹配两种路径/hi或者/hello/hi
    public String hi() {
        return "hi java";
    }
}
